<?php
/* Smarty version 3.1.30, created on 2017-04-20 16:04:02
  from "D:\phpStudy\WWW\Myproject\Projects_liu\Application\User\view\zhuce.html" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_58f86b7284f9e3_35943860',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd409f0edf67ecd5364760d4c25a778b18b55f6bc' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\Myproject\\Projects_liu\\Application\\User\\view\\zhuce.html',
      1 => 1492675439,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_58f86b7284f9e3_35943860 (Smarty_Internal_Template $_smarty_tpl) {
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>zhuce</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <?php echo '<script'; ?>
 src="./jquery-3.1.1.min.js" type="text/javascript"><?php echo '</script'; ?>
>
    </head>
    <body>
        昵称:<input type="text" name="user"/><span id="span1"></span><br/>
        密码:<input type="password" name="pwd"/><span id="span2"></span><br/>
        <input type="button" name="button" value="提交"/><br/>
        <?php echo '<script'; ?>
 type="text/javascript">
            
            $("input[name=button]").click(function(){
               var name=$("input[name=user]").val();
               var pwd=$("input[name=pwd]").val();
               if(name==""){
                  $("#span1").css("color","red");
                  $("#span1").html("昵称不能为空");
               }else if(pwd==""){
                   $("#span1").html("");
                  $("#span2").css("color","red");
                  $("#span2").html("密码不能为空");
               }else{
                   $.ajax({
                      type:"post",
                      url:"index.php?m=User&c=User&a=adduser",
                      data:{name:name,pwd:pwd},
                      success:function(a){
                          if(a==true){
                              window.location.href ="index.php?m=User&c=User&a=denglu"; 
                          }else{
                              alert("注册失败");
                          }
                      }
                   });
               }
            });
            
        <?php echo '</script'; ?>
>
    </body>
</html>
<?php }
}
